/**
 * CC2003
 * 
 * For the course CC2003 - Algorithms and Data Structures of UVG (Universidad del Valle de Guatemala, http://uvg.edu.gt)
 * 
 * 
 * 
 * SVN Repository of my course projects: http://cc2003.svn.sourceforge.net/viewvc/cc2003/
 * 
 * 
 * Copyright (C) 2009 Carlos Lopez Camey
 * visit me at http://kmels.net or write me at c.lopez@kmels.net
 * 
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/> or write to the Free Software Foundation, Inc.,
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

package main;

import java.io.FileInputStream;
import java.io.IOException;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import esquemas.*;

/**
 * @author kmels
 *
 */
public class alumnosUnmarshall {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		 try {
	            // create a JAXBContext capable of handling classes generated into
	            // the primer.po package
	            JAXBContext jc = JAXBContext.newInstance( "esquemas" );
	            
	            // create an Unmarshaller
	            Unmarshaller u = jc.createUnmarshaller();
	            
	            // unmarshal a po instance document into a tree of Java content
	            // objects composed of classes from the primer.po package.
	            JAXBElement<?> poElement = 
			(JAXBElement<?>)u.unmarshal( new FileInputStream( "src/tests/ejemploAlumnos1.xml" ) );
	            Instrucciones po = (Instrucciones)poElement.getValue();
	                
	            
	            // examine some of the content in the PurchaseOrder
	            System.out.println( "Ship the following items to: " );
	            
	            // display the shipping address
	            //USAddress address = po.getShipTo();
	            //displayAddress( address );
	            
	            // display the items
	           // Items items = po.getItems();
	           // displayItems( items );
	            
	        } catch( JAXBException je ) {
	            je.printStackTrace();
	        } catch( IOException ioe ) {
	            ioe.printStackTrace();
	        }
	}
}
